.container {
  display: flex;
  align-items: center;
}

.compactColorField {
  border-radius: 4px;
  color: var(--theme-text-default-color);
  background-color: var(--theme-text-field-default-background-color);
  transition: box-shadow 0.1s;
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  padding-right: 2px;
  min-width: 0px;
}

.container.disabled .compactColorField {
  color: var(--theme-text-field-disabled-color);
}

.container.errored:not(.disabled) .compactColorField {
  border: none;
  outline: 1px solid var(--theme-text-field-default-error);
}
.container.errored:not(.disabled):hover .compactColorField {
  outline: 1px solid var(--theme-text-field-active-error);
}
.container.errored:not(.disabled):focus-within .compactColorField {
  outline: 1px solid var(--theme-text-field-active-error);
}

.compactColorField::before {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  content: '';
  border-radius: 4px;
  pointer-events: none;
}

.container:not(.disabled):not(.errored):hover .compactColorField::before {
  border-bottom: 1px solid var(--theme-text-field-hover-border-color);
}
.container:not(.disabled):not(.errored):focus-within .compactColorField::before {
  border-bottom: 1px solid var(--theme-text-field-active-border-color);
}

.compactColorField input {
  outline: none;
  border: none;
  padding: 2px 8px;
  background-image: none;
  background-color: transparent;
  -webkit-box-shadow: none;
  -moz-box-shadow: none;
  box-shadow: none;
  font-size: 14px;
  line-height: 20px;
  font-family: var(--gdevelop-modern-font-family);
  color: inherit;
  flex: 1;
  caret-color: var(--theme-text-field-active-caret-color);
  min-width: 0px;
  border-radius: inherit; /* Needed for InAppTutorialElementHighlighter to adapt its border-radius to the input container */
}
.compactColorField.withEndAdornment input {
  padding-right: 20px;
}

.compactColorField input::placeholder {
  color: var(--theme-text-field-placeholder-color);
}

/* Chrome, Safari, Edge, Opera */
.compactColorField input::-webkit-outer-spin-button,
.compactColorField input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
